package com.boang.ch;

import java.io.*;

/*
    @author:sa
    @date:2024/12/12 14:11
*/
public class BufferedWriterReaderDemo {
    public static void main(String[] args) throws IOException {
        BufferedReader bufferedReader = new BufferedReader(new FileReader("C:\\Users\\sa\\Desktop\\高数.doc"));
        BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter("C:\\Users\\sa\\Desktop\\高数1.doc"));
        String str=null;
        long start=System.currentTimeMillis();
        while ((str=bufferedReader.readLine())!=null){
           bufferedWriter.write(str);
           bufferedWriter.newLine();
        }
        bufferedReader.close();
        bufferedWriter.close();
        long end=System.currentTimeMillis();
        System.out.println(end-start);
    }
}